package com.sp.system.user.core.exception;

import com.sp.system.user.core.utils.enums.IBaseError;

/**
 *  认证错误
 */
public class ZookeeperException extends RuntimeException {

    private final int errorCode;

    public ZookeeperException(IBaseError error) {
        super(error.getMessage());
        this.errorCode = error.getStatus();
    }

    public ZookeeperException(String message, int errorCode) {
        super(message);
        this.errorCode = errorCode;
    }

    public Integer getErrorCode() {
        return errorCode;
    }
}
